Ring semantics require that for every request, a response be put. This
allows consumer to place a dummy response if need be.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
/* Get all requests off the ring */
while ( mem_event_get_response(&d->mem_event->share, &rsp) )
{
+ if ( rsp.flags & MEM_EVENT_FLAG_DUMMY )
+ continue;
/* Unpause domain/vcpu */
if ( rsp.flags & MEM_EVENT_FLAG_VCPU_PAUSED )
vcpu_unpause(d->vcpu[rsp.vcpu_id]);
/* Pull all responses off the ring */
while( mem_event_get_response(&d->mem_event->paging, &rsp) )
{
+ if ( rsp.flags & MEM_EVENT_FLAG_DUMMY )
+ continue;
/* Fix p2m entry if the page was not dropped */
if ( !(rsp.flags & MEM_EVENT_FLAG_DROP_PAGE) )
{
/* Pull all responses off the ring */
while( mem_event_get_response(&d->mem_event->access, &rsp) )
{
+ if ( rsp.flags & MEM_EVENT_FLAG_DUMMY )
+ continue;
/* Unpause domain */
if ( rsp.flags & MEM_EVENT_FLAG_VCPU_PAUSED )
vcpu_unpause(d->vcpu[rsp.vcpu_id]);
#define MEM_EVENT_FLAG_DROP_PAGE (1 << 1)
#define MEM_EVENT_FLAG_EVICT_FAIL (1 << 2)
#define MEM_EVENT_FLAG_FOREIGN (1 << 3)
+#define MEM_EVENT_FLAG_DUMMY (1 << 4)
/* Reasons for the memory event request */
#define MEM_EVENT_REASON_UNKNOWN 0 /* typical reason */